package com.base.system.managedBean;

import java.util.List;

import org.operamasks.faces.annotation.DataModel;
import org.operamasks.faces.annotation.ManagedBean;
import org.operamasks.faces.annotation.ManagedBeanScope;

import com.base.commons.SpringBeanHolder;
import com.base.security.onlineuser.entity.OnlineUser;
import com.base.security.onlineuser.service.UserLoginHandler;

@ManagedBean(name = "system_listOnlineUserBean", scope = ManagedBeanScope.REQUEST)
public class ListOnlineUserBean {
	private UserLoginHandler userLoginHandler = SpringBeanHolder
			.getBean("userLoginHandler");

	@DataModel(id = "onlineUserGrid")
	private List<OnlineUser> getOnlineUserGrid() {
		return userLoginHandler.getCurrentOnlineUsers();
	}
}
